if (CMAKE_HOST_WIN32)

	SET(CURL_DIR ${THIRD_PARTY}/windows/x86/curl)
	if(CMAKE_SIZEOF_VOID_P EQUAL 8)
		SET(CURL_DIR ${THIRD_PARTY}/windows/x64/curl)
	endif()

	SET(CURL_INCLUDE_DIR ${CURL_DIR}/include)
	SET(CURL_LIB_DIR  ${CURL_DIR}/lib)
	SET(CURL_LIBS libcurl)
ELSE()

	IF(CMAKE_TOOLCHAIN_FILE)
		IF (CMAKE_SYSTEM_NAME STREQUAL Android)

			IF (ANDROID_ABI STREQUAL armeabi-v7a)
				SET(CURL_DIR ${THIRD_PARTY}/android/curl/armeabi-v7a)
			ELSEIF (ANDROID_ABI STREQUAL arm64-v8a)
				SET(CURL_DIR ${THIRD_PARTY}/android/curl/arm64-v8a)
			ENDIF()

			SET(CURL_INCLUDE_DIR ${CURL_DIR}/include)
			SET(CURL_LIB_DIR ${CURL_DIR}/lib)

		ELSEIF (CMAKE_C_COMPILER MATCHES "hisiv300")
			SET(CURL_DIR ${THIRD_PARTY}/hisiv300/curl)
			SET(CURL_INCLUDE_DIR ${CURL_DIR}/include)
			SET(CURL_LIB_DIR ${CURL_DIR}/lib)
		ENDIF()

		IF (CMAKE_C_COMPILER MATCHES "hisiv400")
			SET(CURL_DIR ${THIRD_PARTY}/hisiv400/curl)
			SET(CURL_INCLUDE_DIR ${CURL_DIR}/include)
			SET(CURL_LIB_DIR ${CURL_DIR}/lib)
		ENDIF()

		IF (CMAKE_C_COMPILER MATCHES "hisiv500")
			SET(CURL_DIR ${THIRD_PARTY}/hisiv500/curl)
			SET(CURL_INCLUDE_DIR ${CURL_DIR}/include)
			SET(CURL_LIB_DIR ${CURL_DIR}/lib)
		ENDIF()

		IF (CMAKE_C_COMPILER MATCHES "hisiv600")
			SET(CURL_DIR ${THIRD_PARTY}/hisiv600/curl)
			SET(CURL_INCLUDE_DIR ${CURL_DIR}/include)
			SET(CURL_LIB_DIR ${CURL_DIR}/lib)
		ENDIF()

		IF (CMAKE_C_COMPILER MATCHES "himix100")
			SET(CURL_DIR ${THIRD_PARTY}/himix100/curl)
			SET(CURL_INCLUDE_DIR ${CURL_DIR}/include)
			SET(CURL_LIB_DIR ${CURL_DIR}/lib)
		ENDIF()

		IF (CMAKE_C_COMPILER MATCHES "himix200")
			SET(CURL_DIR ${THIRD_PARTY}/himix200/curl)
			SET(CURL_INCLUDE_DIR ${CURL_DIR}/include)
			SET(CURL_LIB_DIR ${CURL_DIR}/lib)
		ENDIF()
		SET(CURL_LIBS curl)
	ELSE()
		SET(CURL_DIR ${THIRD_PARTY}/gcc/curl)
		SET(CURL_INCLUDE_DIR ${CURL_DIR}/include)
		SET(CURL_LIB_DIR ${CURL_DIR}/lib)
		SET(CURL_LIBS ${CURL_LIB_DIR}/libcurl.a)
	ENDIF()	
ENDIF()
